﻿namespace SFWS.XHandler.Core
{
    using System;
    using System.Reflection;
    using System.Resources;

    internal sealed class MappingNode
    {
        private System.Reflection.Assembly ass = null;
        private string handlerSuffix = "";
        private bool loginExclude = false;
        private string path = "";
        private ResourceManager rm = null;

        public MappingNode(string path, string assemblyName, string handlerSuffix, bool loginExclude)
        {
            this.path = path;
            this.handlerSuffix = handlerSuffix;
            this.loginExclude = loginExclude;
            try
            {
                this.ass = System.Reflection.Assembly.Load(assemblyName);
            }
            catch
            {
            }
        }

        public System.Reflection.Assembly Assembly
        {
            get
            {
                return this.ass;
            }
        }

        public string HandlerSuffix
        {
            get
            {
                return this.handlerSuffix;
            }
        }

        public bool IsLoginExclude
        {
            get
            {
                return this.loginExclude;
            }
        }

        public string Path
        {
            get
            {
                return this.path;
            }
        }

        public ResourceManager Resources
        {
            get
            {
                return this.rm;
            }
        }
    }
}

